package com.example.springapplicationdemo.errorcontroller;

import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

@RequestMapping("order_exception_controller")
@RestController
public class OtherExceptionController {

    @GetMapping("{id}/_update")
    public ModelAndView update(@PathVariable Long id){
        if (id.equals(1L)){
            throw new NullPointerException();
        }
        return new ModelAndView("controller_success");
    }

}
